package com.wkq;


import org.greenrobot.greendao.generator.DaoGenerator;
import org.greenrobot.greendao.generator.Entity;
import org.greenrobot.greendao.generator.Schema;

public class MainDaoGenerator {

    public static void main(String args[]) throws Exception {
        Schema schema = new Schema(4, "com.wkq.database.dao");
        addUSer(schema);
        addVoaword(schema);

        new DaoGenerator().generateAll(schema, args[0]);
    }


    private static void addUSer(Schema schema) {
        Entity uploadVideo = schema.addEntity("VoaUserInfo");
        uploadVideo.setHasKeepSections(true);
        uploadVideo.addStringProperty("UserOpenId").primaryKey();
        uploadVideo.addStringProperty("UserName").notNull();
        uploadVideo.addStringProperty("UserIconPath").notNull();
        uploadVideo.addStringProperty("UserToken").notNull();
    }

    private static void addVoaword(Schema schema) {
        Entity uploadVideo = schema.addEntity("VoaWordInfo");
        uploadVideo.setHasKeepSections(true);
        uploadVideo.addLongProperty("time");
        uploadVideo.addStringProperty("desc").primaryKey();

    }


}
